BlueCielo Meridian Enterprise 2012 Developer's Guide | BlueCielo ECM Solutions

Extending commands and events

The SetCustomerInfo task copies customer information to the document properties in the Meridian Enterprise vault. When customer information is changed in the external database, the task will have to be rerun for each document to update the property values.

Meridian Enterprise does not provide built-in functionality to add commands to Web Access. The sample vault configuration uses the existing Issue New Filename command and extends it to refresh the customer information. This is done by submitting the task from the BeforeCalculateFileName event as shown in the following code. A Vault.Parametercall is used to prevent the task from being invoked twice for newly created documents.

Because the customer name can change in the external database, the task uses either CustomerID or CustomerName to refresh property values.

Sub DocGenericEvent_BeforeCalculateFileName(Batch)
If Vault.Parameter("UpdateCustomerInfo") = "Started" Then
' An update is already started by DocGenericEvent_AfterNewDocument
Vault.Parameter ("UpdateCustomerInfo") = ""
Else
' Submit a task to update the customer properties
' This will update the document properties in case any information was changed in the Customer database
Call UpdateCustomerInfo (Document, Document.CustomerID, Document.CustomerName)
End If
End Sub

Copyright © 2000-2012 BlueCielo ECM Solutions

www.bluecieloecm.com